import request from '@/utils/request'

// 获取设备实时监测数据
export function getDeviceMonitorData(deviceId) {
  return request({
    url: '/iot/monitor/realtime/' + deviceId,
    method: 'get'
  })
}

// 刷新设备实时监测数据
export function refreshDeviceMonitorData(deviceId) {
  return request({
    url: '/iot/monitor/refresh/' + deviceId,
    method: 'get'
  })
}

// 获取设备历史监测数据
export function getDeviceHistoryData(deviceId, query) {
  return request({
    url: '/iot/monitor/history/' + deviceId,
    method: 'get',
    params: query
  })
} 